<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>导航栏1</title>
    <style>
        .nav {
            height: 60px;
            width: 100%;
            background-color: #333;
        }

        .nav a {
            display: inline-block;
            text-align: center;
            height: 60px;
            width: 100px;
            text-decoration: none;
            color: white;
            line-height: 60px;
        }

        a:hover {
            background-color: cornflowerblue;
        }

        * {
            margin: 0px;
            /* 到边框距离 */
        }

        body {
            text-align: center;
            /* 文字水平居中 */
        }
    </style>
</head>

<body>
    <div class="nav">
        <a href="#">AAAAA</a>
        <a href="#">AAAAA</a>
        <a href="#">AAAAA</a>
        <a href="#">AAAAA</a>
        <a href="#">AAAAA</a>
    </div>
</body>

</html>